<template>
  <div>
      <h1>
          学生注册页面
      </h1>
      <p>学生姓名：<input type="text" v-model="name"></p>
      <p>账户：<input type="text" v-model="user"></p>
      <p>密码：<input type="text" v-model="pwd"></p>
      <p><button @click="zc">注册</button></p>
  </div>
</template>


<script>
import axios from 'axios'
export default {
    data(){
        return{
            name:'',
            user:'',
            pwd:'',
        }
    },
    // 点击事件
    methods:{
        zc(){
            axios({
                url:'http://127.0.0.1:8000/zhu/zi/',
                method:'post',
                data:{"name":this.name,"user":this.user,"pwd":this.pwd}
            }).then(res=>{
                console.log(res.data)
            })
        }
        
    },
}
</script>

<style>

</style>